package com.bs.blogspace.mapper;

import com.bs.blogspace.pojo.User;
import com.bs.blogspace.pojo.UserLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserLogMapper {
    @Insert("insert into user_log(create_time, description) VALUES (#{creatime},#{description})")
    void insert(UserLog userLog);

    //根据手机号获取用户
    @Select("select username from user where phone=#{phone}")
    User getByPhone(String phone);
}